package com.tucc.hello.leetcode.no1_400.no201_400.no342;

/**
 * @author tucc
 * @description todo
 * @package com.tucc.hello.leetcode
 * @date 2021/5/20
 **/
public class Solution {

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.print(64 & 3);
        System.out.print(solution.isPowerOfFour(33));
    }

    public boolean isPowerOfFour(int n) {
        while (n > 0 && (n & 3) == 0) {
            n >>= 2;
        }
        return n == 1;
    }

}
